﻿$.get("../../ForumManage/Login/GetSystemMenuList", function (data) {

    let str = "";
    for (var i = 0; i < data.length; i++) {
        str += "<li>";
        str += "<a href='#subPages" + data[i].id + "' data-toggle='collapse' class='collapsed'><i class='lnr lnr-file-empty'></i> <span>" + data[i].title + "</span> <i class='icon-submenu lnr lnr-chevron-left'></i></a>";
        str += "<div id='subPages" + data[i].id +"' class='collapse '>";
        str += "<ul class='nav'>";
        for (let j = 0; j < data[i].children.length; j++)
        {
            str += "<li><a href='" + data[i].children[j].link + "' class=''>" + data[i].children[j].title + "</a></li>";
        }
        str += "</ul>";
        str += "</div>";
        str += "</li>";

        $("#LeftDropdownList").html(str);
    }

}, "json");